#ifndef QROHOSTDELEGATE_H
#define QROHOSTDELEGATE_H

#include <QObject>
#include <QVariant>

class QROClient;
class QROHost;
/*
*安装在服务端，用于操控服务端与客户端之间的信息过滤
*/

class QROHostDelegate:public QObject
{
    Q_OBJECT
public:
    QROHostDelegate();
    ~QROHostDelegate();

    QROHost* host();

public:
    //客户端过滤器，可以通过客户端给定的cookie来决定是否允许客户端连接
    virtual bool onClientTryConnect(QVariant cookie){return true;}
    //当有新的客户端连接上了以后
    virtual void onClientConnected(QROClient* client){}

//    virtual void onDispatchProperty(QList<>){}
protected:

private:
    friend class QROHost;
    QROHost* m_host;
};


#endif
